Version Packages - #2
Closed
github-actions[bot] wants to merge 1 commit into
Closed
Conversation
github-actions
Bot
force-pushed
the
changeset-release/main
branch
12 times, most recently
from
August 16, 2026 18:30
803b4aa to
e44415f
Compare
github-actions
Bot
force-pushed
the
changeset-release/main
branch
from
August 16, 2026 18:50
e44415f to
64c0d54
Compare
Owner
|
Superseded. The four changesets this was built from were consumed manually when 0.5.0 was released — the version was set to 0.5.0 rather than the computed 0.2.0, because the roadmap had already reached v0.5 before anything was published. This PR is now conflicting and would roll |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
resilix@0.2.0
Minor Changes
b2181bb: v0.5 — hedging, criticality, and tenant fairness.
Built to
docs/specs/hedging-and-priority.md.hedge— races a second attempt against a slow first one and cancels the loser. The delaydefaults to the measured p95 for that key rather than a constant, because Dean & Barroso's
~2% overhead follows from hedging at a high percentile; a stale constant loses the property
that made hedging cheap.
idempotent: trueis required, not documented — a hedge sends thesame request twice, and on a payment that is a double charge.
critical/degraded/bestEffort/bulk),shed progressively as pressure rises. Their incident is the case for it: a 12× prefetch spike,
over half of all requests throttled, and user-initiated availability still above 99.4%.
above
admitted / activeTenantsis shed first, and heaviness decays so nobody is punishedforever.
Policy.admit()now takes an optionalAdmissionRequestcarrying priority and tenant. Breakingfor anyone who implemented a custom policy; additive in behaviour, since a policy that ignores
the argument behaves exactly as before.
7e7d4fd: v0.4 — retry with budgets, adaptive throttling, and rate limiting.
Built to
docs/specs/retry-and-throttling.md. All eight acceptance criteria pass, includingreproducing Google SRE's amplification numbers: unbudgeted retries multiply load ~3x, a 10%
budget holds it near 1.1x.
retry— full jitter by default,random(0, min(cap, base·2^n)). AWS measured no-jitteras the "clear loser" and equal jitter as "much longer"; full costs the upstream less work than
decorrelated at slightly more elapsed time, and a library guarding someone else's service
should not spend their capacity to shave its own tail. All four strategies ship.
budget— a shared object, because a per-policy cap cannot bound system-wideamplification. Pass one instance to every pipeline in the process.
throttler— Google SRE client-side throttling,max(0, (requests − K·accepts) / (requests + 1))with K=2 over a two-minute window. Unlike a breaker it sheds a fraction, sotraffic keeps flowing and recovery is observed continuously.
rateLimit— a token bucket that refills continuously, so straddling an interval boundarycannot yield 2x the limit.
The verdict model does real work here:
answeredis never retried (the upstream worked, thecaller was wrong) and
rejectedis never retried (we refused it ourselves). Aboolean-predicate library retries both by default.
Two decisions worth knowing:
probabilistic throttling exist to decorrelate clients, so a deterministic approximation
produces exactly the thundering herd they prevent.
Randomis injected likeClock: seeded intests, lazy at runtime so Workers still works.
timeoutMsnow bounds the whole retry sequence, not each attempt. Most libraries boundeach attempt, so a caller asking for 50ms can wait
maxAttempts × (50ms + backoff). A deadlinethe caller cannot see is not a deadline.
Patch Changes
0cea0ed: ADR-007 is now enforced by the build rather than by memory, and enforcing it found a fifth
violation.
src/adr-007.conformance.test.tsruns every policy through the same checks. The key insight isthat two of the six checklist items collapse into one much stronger invariant:
Compared across
snapshot()andmetrics(), that single assertion catches every historicalinstance. A completeness test enumerates the package's exports and probes for the
Policyshape, so a new policy that is not registered for conformance fails the build — forgetting is no
longer an available failure mode. The harness is itself verified against two deliberately-broken
policies, because a conformance check that passes vacuously is worse than none.
Fixed as a result:
rateLimitspent a token inadmit()and never refunded it when an innerpolicy refused the call, silently lowering the effective rate below the configured one.
f13a5df: Review fixes, two of them correctness bugs in v0.5.
an original that would have succeeded, so hedging made reliability worse — two copies double
the exposure to a transient failure and the quicker error wins. It now takes the first
success, and only rejects when every copy has failed.
admit(). That billed a tenant for calls an inner policyrefused, and since usage is what gets you shed, it was a feedback loop inside the fairness
mechanism itself.
Observationnow carriestenantso usage is charged atsettle().pnpm test:perf. Measured under v8 coverageit reported ~2,100 ns against a 1,000 ns budget; uninstrumented the same loop is ~57 ns. A
wall-clock assertion under instrumentation measures the instrumentation, and it was failing CI
for a non-problem.
snapshot/hydrate/metrics/resetare now tested for every v0.4 and v0.5 policy —they had shipped untested, which is the serverless surface and where ADR-005 already found a
bug.